updating oE days_in_month

days_in_month

include datetime.e 
namespace datetime 
public function days_in_month(datetime dt) 

returns the number of days in the month of dt.

Comments:

This takes into account leap year.

Parameters:
  1. dt : a datetime to be queried.
Example 1:
d = new(2008, 1, 1, 0, 0, 0) 
? days_in_month(d) -- 31 
d = new(2008, 2, 1, 0, 0, 0) -- Leap year 
? days_in_month(d) -- 29 
See Also:

is_leap_year

Not Categorized, Please Help

Search



Quick Links

User menu

Not signed in.

Misc Menu